package com.itcam.tingshu.user.factory;

import com.itcam.tingshu.user.strategy.PaymentStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author : Cammy.Wu
 * Description : 
 */

@Service
public class PaymentStrategyFactory {

    // 字符串：albumPaymentStrategy
    // 字符串：trackPaymentStrategy
    // 字符串：vipPaymentStrategy

    @Autowired
    private Map<String, PaymentStrategy> strategyMap;

    public PaymentStrategy getStrategy(String itemType) {
        return strategyMap.get("itemType");
    }
}
